home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / FROMUTS / LITTLEST / !LittleST / h / ENV next >
Text File  |  1992-03-04  |  4KB  |  205 lines

  1. /*
  2.         Little Smalltalk, version two
  3.         Written by Tim Budd, Oregon State University, July 1987
  4.  
  5.         environmental factors
  6.  
  7.         This include file gathers together environmental factors that
  8.         are likely to change from one C compiler to another, or from
  9.         one system to another.  Please refer to the installation 
  10.         notes for more information.
  11.  
  12.         for systems using the Make utility, the system name is set
  13.         by the make script.
  14.         other systems (such as the Mac) should put a define statement
  15.         at the beginning of the file, as shown below
  16. */
  17.  
  18. /*
  19. systems that don't use the Make utility should do something like this:
  20. # define LIGHTC
  21. */
  22.  
  23. # ifdef ARM
  24.         /* RiscOS 3 */
  25.  
  26. typedef unsigned char byte;
  27.  
  28. # define byteToInt(b) (b)
  29.  
  30. # define longCanBeInt(l) ((l >= -1073741824) && (l <= 1073741824))
  31.  
  32. # define STRING
  33.  
  34. # endif
  35.  
  36. /*=============== rules for various systems ====================*/
  37.  
  38. # ifdef B42
  39.         /* Berkeley 4.2, 4.3 and compatible running tty interface */
  40.                 /*   which include: */
  41.                 /* sequent balance */
  42.                 /* Harris HCX-7 */
  43.                 /* sun workstations */
  44.  
  45. typedef unsigned char byte;
  46.  
  47. # define byteToInt(b) (b)
  48.  
  49. /* this is a bit sloppy - but it works */
  50. # define longCanBeInt(l) ((l >= -16383) && (l <= 16383))
  51.  
  52. # define STRINGS
  53. # define SIGNAL
  54.  
  55. # endif
  56.  
  57. # ifdef SYSV
  58.         /* system V systems including: */
  59.         /*      HP-UX for the HP-9000 series */
  60.         /*      TEK 4404 with some modifications (see install.ms) */
  61.  
  62. typedef unsigned char byte;
  63.  
  64. # define byteToInt(b) (b)
  65.  
  66. # define longCanBeInt(l) ((l >= -16383) && (l <= 16383))
  67.  
  68. # define STRING
  69.  
  70. # endif
  71.  
  72. # ifdef TURBOC
  73.         /* IBM PC and compatiables using the TURBO C compiler */
  74.         
  75.         /* there are also changes that have to be made to the 
  76.                 smalltalk source; see installation notes for
  77.                 details */
  78.  
  79. typedef unsigned char byte;
  80.  
  81. # define byteToInt(b) (b)
  82.  
  83. # define longCanBeInt(l) ((l >= -16383) && (l <= 16383))
  84.  
  85. # define STRING
  86. # define ALLOC
  87. # define BINREADWRITE
  88. # define CTRLBRK
  89. # define PROTO
  90. # define obtalloc(x,y) (struct objectStruct huge *) farcalloc((unsigned long) x, (unsigned long) y)
  91.  
  92. #endif
  93.  
  94. # ifdef ATARI
  95.         /* Atari st 1040 - still exprimental */
  96.         
  97. typedef unsigned char byte;
  98.  
  99. # define byteToInt(b) (b)
  100.  
  101. # define longCanBeInt(l) ((l >= -16383) && (l <= 16383))
  102.  
  103. # define STRING
  104. # define ALLOC
  105. # define BINREADWRITE
  106. # define obtalloc(x,y) (struct objectStruct *) calloc((unsigned) x, (unsigned) y)
  107.  
  108. #endif
  109.  
  110. # ifdef LIGHTC
  111.                 /* Macintosh using Lightspeed C compiler */
  112.                 /* see install.ms for other changes */
  113.  
  114. typedef unsigned char byte;
  115.  
  116. # define byteToInt(b) (b)
  117.  
  118. # define longCanBeInt(l) ((l >= -16383) && (l <= 16383))
  119.  
  120. # define STRINGS
  121. # define BINREADWRITE
  122. # define STDWIN
  123. # define NOARGC
  124. # define PROTO
  125. # define NOSYSTEM
  126. # define obtalloc(x,y) (struct objectStruct *) calloc((unsigned) x, (unsigned) y)
  127.  
  128. # endif
  129.  
  130. # ifdef VMS 
  131.         /* VAX VMS */
  132.  
  133. typedef unsigned char byte;
  134.  
  135. # define byteToInt(b) (b)
  136.  
  137. # define longCanBeInt(l) ((l >= -16383) && (l <= 16383))
  138.  
  139. # define STRING
  140. # define NOARGC
  141.  
  142. # endif
  143.  
  144. /* ======== various defines that should work on all systems ==== */
  145.  
  146. # define streq(a,b) (strcmp(a,b) == 0)
  147.  
  148. # define true 1
  149. # define false 0
  150.  
  151.         /* define the datatype boolean */
  152. # ifdef NOTYPEDEF
  153. # define boolean int
  154. # endif
  155. # ifndef NOTYPEDEF
  156. typedef int boolean;
  157. # endif
  158.  
  159.         /* define a bit of lint silencing */
  160.         /*  ignore means ``i know this function returns something,
  161.                 but I really, really do mean to ignore it */
  162. # ifdef NOVOID
  163. # define ignore
  164. # define noreturn
  165. # define void int
  166. # endif
  167. # ifndef NOVOID
  168. # define ignore (void)
  169. # define noreturn void
  170. # endif
  171.  
  172. /* prototypes are another problem.  If they are available, they should be
  173. used; but if they are not available their use will cause compiler errors.
  174. To get around this we define a lot of symbols which become nothing if
  175. prototypes aren't available */
  176. # ifdef PROTO
  177.  
  178. # define X ,
  179. # define OBJ object
  180. # define OBJP object *
  181. # define INT int
  182. # define BOOL boolean
  183. # define STR char *
  184. # define FLOAT double
  185. # define NOARGS void
  186. # define FILEP FILE *
  187. # define FUNC ()
  188.  
  189. # endif
  190.  
  191. # ifndef PROTO
  192.  
  193. # define X
  194. # define OBJ
  195. # define OBJP
  196. # define INT
  197. # define BOOL
  198. # define STR
  199. # define FLOAT
  200. # define NOARGS
  201. # define FILEP
  202. # define FUNC
  203.  
  204. # endif
  205.